package configLoad;

import java.util.List;

import org.apache.commons.configuration.AbstractConfiguration;

public class Test {
	public static void main(String[] args) {
		// AbstractConfiguration.setDefaultListDelimiter('|');
		AbstractConfiguration pc = ConfigLoad.load("common-config");
		AbstractConfiguration xc = ConfigLoad.load("businessconfig");
		for (int i = 0; i < 1000; i++) {

			String v = pc.getString("produceID");
			System.out.println("1----" + v);

			v = xc.getString("path[@value]");
			System.out.println("path[@value]------" + v);
			v = xc.getString("objectType.obj_01.description");
			System.out.println("---" + v);
			List list = xc.getList("suffixlist");
			System.out.println("suffixlist--" + list);


			list = xc.getList("flist");
			System.out.println("getListDelimiter: " + xc.getListDelimiter());
			System.out.println("flist--" + list);

			list = xc.getList("suffixlist");
			System.out.println("suffixlist--" + list);

			list = xc.getList("student.name");
			System.out.println(list);
			list = xc.getList("student[@id]");
			System.out.println(list);
			v = xc.getString("student(1)[@id]");
			System.out.println(v);
			list = xc.getList("objectType.obj_01[@]");
			System.out.println(list);
			try {
				Thread.sleep(1000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}

	}
}
